package main

import (
	"fmt"
)

type Animal interface {
	Speak()
	Eat()
}

type Dog struct {
	name string
}

func (d Dog) Speak() {
	fmt.Println(d.name, "says woof!")
}

func (d Dog) Eat() {
	fmt.Println(d.name, "is eating meat!")
}

type Cat struct {
	name string
}

func (c Cat) Speak() {
	fmt.Println(c.name, "says meow!")
}

func (c Cat) Eat() {
	fmt.Println(c.name, "is eating fish!")
}


func main() {
	var a Animal
	d := Dog{"Buddy"}
	c := Cat{"Whiskers"}

	a = d
	a.Speak()
	a.Eat()

	a = c
	a.Speak()
	a.Eat()
}